#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
namespace yyh{
	int n,q;
	string s[200005][3],t[200005][3];
	signed main(){
		cin>>n>>q;
		for(int i=1;i<=n;i++)
			cin>>s[i][1]>>s[i][2];
		for(int i=1;i<=q;i++){
			cout<<0<<endl;
		}
		return 0;
	}
}
signed main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	yyh::main();
	return 0;
}
